﻿@model MVCCricketWorldCupTrivia.Models.Question

@{
    ViewBag.Title = "Create";
    Layout = "~/Views/Shared/_Layout.cshtml";
}

<script type="text/javascript" 
src="@Url.Content("~/Content/Scripts/jquery-1.4.1.js")"></script> 
<script type="text/javascript">
    $(document).ready(function () {
        $('#PlayersAnswer').focus();
    });
</script>


<fieldset>
<h3>Scoreboard</h3>
    <div class="Scoreboard">
    @{if( Model!= null)   
        {
            <div class="display-label">Sri LankaScore</div>
            <div class="display-field">@Model.CurrentGame.SriLankaScore</div>

            <div class="display-label">Wickets</div>
            <div class="display-field">@Model.CurrentGame.Wickets</div>

            <div class="display-label">Runs</div>
            <div class="display-field">@Model.CurrentGame.Runs</div>
        
            <div class="display-label">Overs</div>
            <div class="display-field">@Model.CurrentGame.Overs</div>
        }
    }
    </div>
</fieldset>
    

@using (Html.BeginForm())
{
    @Html.ValidationSummary(true)
    <fieldset>
        <h3>Question</h3>

        @Html.HiddenFor(m => m.QuestionID) 

        <div class="display-label">Question:</div>
        <div class="display-field"> @Model.QuestionText </div>

        @Html.LabelFor(model => model.PlayersAnswer)
      
        <div class="editor-field" >
            @Html.EditorFor(model => model.PlayersAnswer)
            @Html.ValidationMessageFor(model => model.PlayersAnswer)
        </div>
         <div class="editor-label">
            @Html.LabelFor(model => model.AttackLevel)
        </div>
        <div class="editor-field" >
            @Html.EditorFor(model => model.AttackLevel)
            @Html.ValidationMessageFor(model => model.AttackLevel)
        </div>

        <p>
            <input type="submit" value="Play" />
        </p>
    </fieldset>
}



